package com.icreate;

import com.icreate.storm.ReportBolt;
import com.icreate.storm.spout.SentenceSpout;
import com.icreate.storm.bolt.XdrTypeBolt;
import com.icreate.storm.WordCountBolt;
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.storm.tuple.Fields;
import org.apache.storm.utils.Utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Hello world!
 */
public class App {
    private static SimpleDateFormat dateSDF = new SimpleDateFormat("yyyyMMdd");
    private static SimpleDateFormat hourSDF = new SimpleDateFormat("HH");

    public static void main(String[] args) {
        long ts = 1494568140000L;//2017-5-12 13:49:00
        Date date = new Date(ts);
        System.out.print(dateSDF.format(ts));
        System.out.print(hourSDF.format(ts));
    }
}
